package com.chinasofti.map03;

import java.util.TreeMap;
import java.util.TreeSet;

public class Test01 {
    public static void main(String[] args) {
        TreeMap<Student,String> tm = new TreeMap<>();
        Student s1 = new Student("lilei",23);
        Student s2 = new Student("dali",22);
        Student s3 = new Student("xiaoming",23);

        tm.put(s1,"江苏");
        tm.put(s2,"北京");
        tm.put(s3,"南京");

        tm.forEach(
                (Student key,String value)->{
                    System.out.println(key + "---" + value);
        }
        );
    }

}
